// DriveNotes. Copyright (c) 2011, Andrei Senchuk. All rights reserved.
package net.taviscaron.drivenotes.web.core.impl;

import java.util.Map;
import net.taviscaron.drivenotes.web.action.Action;
import net.taviscaron.drivenotes.web.core.ActionFactory;
import org.springframework.beans.factory.annotation.Required;

/**
 * ActionFactory impl
 * @author Andrei Senchuk
 */
public class ActionFactoryImpl implements ActionFactory {
    private Map<String, Action> actions;

    @Required
    public void setActions(Map<String, Action> actions) {
        this.actions = actions;
    }

    public Action getAction(String name) {
        return actions.get(name);
    }
}
